Configure Flipper server open URL, plugin install, and activation - #24
Open
sugarmanz wants to merge 3 commits into
Open
Configure Flipper server open URL, plugin install, and activation#24sugarmanz wants to merge 3 commits into
sugarmanz wants to merge 3 commits into
Conversation
Member
Author
|
/canary |
|
Canary version successfully sends the init message and works with dynex studio. |
sugarmanz
marked this pull request as ready for review
September 11, 2026 23:02
sugarmanz
enabled auto-merge (squash)
September 11, 2026 23:03
sugarmanz
disabled auto-merge
September 11, 2026 23:13
Give FlipperServerTransport control over three things that previously required a manual Flipper desktop app: a configurable browser-open URL (instead of always opening http://localhost:52342), installing the devtools plugin via Flipper's documented plugins-install-from-npm RPC (instead of requiring the repo's local justfile/Bazel tooling), and explicit enablePlugin/disablePlugin methods that send the init/deinit handshake Flipper's device SDK requires before it will relay plugin messages — something flipper-server never does on its own for a non-background plugin without a desktop UI attached.
sugarmanz
force-pushed
the
flipper-server-config
branch
from
September 11, 2026 23:23
85f1ed0 to
f585552
Compare
ensurePluginInstalled() now runs inside enablePlugin() itself rather than once in the client-connected handler, since the plugin can be installed/removed on the attached flipper-server independently of this transport (e.g. a human using the desktop UI concurrently) — a cached "already installed" snapshot can't be trusted across calls. sendLifecycleMessage's implicit target list is now computed by enablePlugin/disablePlugin themselves (the layer that owns the init/deinit semantics) instead of embedding method-specific dedup logic inside the generic send helper: enablePlugin skips clients already believed active, disablePlugin only targets clients believed active.
sugarmanz
enabled auto-merge (squash)
September 12, 2026 00:12
Install and activation now happen lazily inside enablePlugin(), triggered per client-connected event via autoEnablePlugin — not as a one-time step when bin/run starts, which is what the docs still said after the previous commit moved ensurePluginInstalled() out of bin/run and into enablePlugin().
Member
Author
|
/canary |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Gives
FlipperServerTransportcontrol over three things that previously required a manual Flipper desktop app:open/urlconstructor options (env varsPLAYER_DEVTOOLS_FLIPPER_OPEN/PLAYER_DEVTOOLS_FLIPPER_URLin the CLI). Off by default; when enabled, opens a caller-supplied URL instead of always openinghttp://localhost:52342.flipper-serveritself is always launched with--open=falseand browser-opening is now driven by the transport.ensurePluginInstalled()uses Flipper's own documented plugin-management RPCs (plugins-get-installed-plugins,plugins-install-from-npm) — the same commands the desktop UI's "Install Plugin" button calls — instead of reaching into~/.flipper/installed-pluginsor shelling out to this repo's localjust install-flipper-clientrecipe.flipper-plugin-player-ui-devtoolsis already published to npm, so this works for any consumer of@player-devtools/mcp, not just repo checkouts.enablePlugin(clientId?)/disablePlugin(clientId?)send theinit/deinithandshake Flipper's device SDK requires before it will open a live plugin connection and relay messages. Nothing inflipper-serversends this automatically for a non-background, foreground-only plugin like ours without a full desktop Flipper app attached with the plugin's tab selected — these methods let a caller trigger the same handshake directly.enablePlugin()always callsensurePluginInstalled()first (the plugin can be installed/removed on the attached flipper-server independently of this transport, so there's no "already installed" snapshot that stays trustworthy across calls), and skips clients it already believes are active;disablePlugin()without aclientIdonly targets clients it believes are active. An opt-inautoEnablePluginconstructor flag (used bybin/run) callsenablePlugin(clientId)automatically for every connecting client.The CLI (
player-devtools-mcp/bin/run) setsautoEnablePlugin: true, so every connecting client gets the plugin installed (if needed) and activated automatically as it connects — no manual Flipper UI interaction or separate startup step required.Test plan
bazel test //devtools/client/flipper:flipper_eslint //devtools/client/flipper:flipper_vitest //devtools/mcp:mcp_eslint //devtools/mcp:mcp_vitest— all passbazel build //devtools/mcp:mcp_ts_types_transitive_typecheck_test— passes across both packagesplayer-devtools-mcpwith a Player app instance connected as a device and no Flipper desktop UI running; confirmlist_players/get_player_statussucceed without any manual Flipper UI interactionPLAYER_DEVTOOLS_FLIPPER_OPEN=true PLAYER_DEVTOOLS_FLIPPER_URL=https://player-ui.tools:52342opens the custom URL instead oflocalhost:52342Release Notes
@player-devtools/mcpno longer requires any manual Flipper desktop app interaction to install or activate the Player UI Devtools plugin — the MCP server now installs the plugin (via Flipper's own plugin-management API) and activates it automatically for each connecting device.FlipperServerTransportgainsopen/urloptions for controlling whether/where a browser UI opens (env varsPLAYER_DEVTOOLS_FLIPPER_OPEN/PLAYER_DEVTOOLS_FLIPPER_URLfor the CLI), and newensurePluginInstalled()/enablePlugin()/disablePlugin()methods for consumers embedding the transport directly.📦 Published PR as canary version:
0.14.3--canary.24.1158Try this version out locally by upgrading relevant packages to 0.14.3--canary.24.1158